package com.lzq.springbook.dao;

import com.lzq.springbook.model.BookInfo;
import org.springframework.context.annotation.Configuration;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@Configuration
public class BookDao {
//    public List<BookInfo> mockData() {
//        List<BookInfo> list = new ArrayList<>();
//        for (int i = 0; i < 15; i++) {
//            BookInfo book = new BookInfo();
//            book.setBookId(i);
//            book.setBookName("book"+i);
//            book.setAuthor("author"+i);
//            book.setNum(2*i+5);
//            book.setPrice(BigDecimal.valueOf(7*i+10));
//            book.setPublishName("publish"+i);
//            book.setState(i%2==0?1:0);
//            list.add(book);
//        }
//        return list;
//    }
}
